package com.supersoul.myself.service;

import com.supersoul.myself.entity.Blog;
import com.supersoul.myself.entity.BlogCollection;
import com.supersoul.myself.entity.User;
import com.supersoul.myself.ex.ServiceException;
import com.supersoul.myself.util.PageVO;
import com.supersoul.myself.util.R;
import org.springframework.data.domain.Page;

public interface BlogService {

    String saveBlog(Blog blog, User user) throws ServiceException;

    Blog findBlogById(String id) throws ServiceException;

    void delBlogById(String id, User user) throws ServiceException;

    Page<Blog> findBlogPerson( PageVO pageVO, Integer permissionState, Integer publishState, String cgId, Integer orderId, User user) throws ServiceException;

    Page<Blog> findBlogPublic(PageVO pageVO, String cgId) throws ServiceException;

    Integer clickLikes(String blogId) throws ServiceException;
    Integer cancelLikes(String blogId) throws ServiceException;

    R collectBlog(BlogCollection blogCollection) throws ServiceException;

    Page<BlogCollection> getUserBlogCollectionPage(User user, PageVO pageVO);
}
